{% extends 'admin/admin_base.html' %}

{% block content %}
    <div class="container">
        <div class="border border-primary rounded" style="max-width: 700px;margin: 0 auto;padding: 16px 40px">
            <h3>Movies Add</h3>

            <hr>
            <form method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="img">Img</label>
                    <input class="form-control" type="file" id="img" name="img" accept="image/*" required>
                </div>

                <div class="form-group">
                    <label for="name">Name</label>
                    <input type="text" class="form-control" id="name" name="name" required>
                </div>

                <div class="form-group">
                    <label for="genres">Genres</label>
                    {#                    <input type="text" class="form-control" id="genres" name="genres" required>#}
                    <div>
                        {% for genre in li_genres %}
                            <div class="form-check form-check-inline" style="margin: 8px">
                                <input class="form-check-input" type="checkbox" id="myFavorGenres" class="cks"
                                       name="genres"
                                       value="{{ genre.id }}">
                                <label class="form-check-label" for="myFavorGenres">{{ genre.value }}</label>
                            </div>
                        {% endfor %}
                    </div>
                </div>

                <div class="form-group">
                    <label for="directors">Directors</label>
                    <input type="text" class="form-control" id="directors" name="directors" required>
                </div>

                <div class="form-group">
                    <label for="actors">Actors</label>
                    <input type="text" class="form-control" id="actors" name="actors" required>
                </div>

                <div class="form-group">
                    <label for="desc">Desc</label>
                    <textarea class="form-control" rows="3" id="desc" name="desc" required></textarea>
                </div>

                <div class="form-group">
                    <label for="year">Year</label>
                    <input type="text" class="form-control" id="year" name="year" required>
                </div>


                <div>
                    <input class="btn btn-primary" style="width: 100%" type="submit" value="Submit">
                </div>
            </form>
        </div>
    </div>

{% endblock %}